home *** CD-ROM | disk | FTP | other *** search
/ Visual Basic Source Code / Visual Basic Source Code.iso / vbsource / change4a / change.frm next >
Text File  |  1999-09-22  |  4KB  |  130 lines

  1. VERSION 5.00
  2. Begin VB.Form Form1 
  3.    BackColor       =   &H80000007&
  4.    Caption         =   "Form1"
  5.    ClientHeight    =   5805
  6.    ClientLeft      =   60
  7.    ClientTop       =   345
  8.    ClientWidth     =   6570
  9.    LinkTopic       =   "Form1"
  10.    ScaleHeight     =   5805
  11.    ScaleWidth      =   6570
  12.    StartUpPosition =   3  'Windows Default
  13.    Begin VB.CommandButton cmdChange 
  14.       BackColor       =   &H00FF0000&
  15.       Caption         =   "Change &Width"
  16.       BeginProperty Font 
  17.          Name            =   "MS Sans Serif"
  18.          Size            =   8.25
  19.          Charset         =   0
  20.          Weight          =   700
  21.          Underline       =   0   'False
  22.          Italic          =   -1  'True
  23.          Strikethrough   =   0   'False
  24.       EndProperty
  25.       Height          =   495
  26.       Index           =   3
  27.       Left            =   2640
  28.       Style           =   1  'Graphical
  29.       TabIndex        =   3
  30.       Top             =   3480
  31.       Width           =   1215
  32.    End
  33.    Begin VB.CommandButton cmdChange 
  34.       BackColor       =   &H00FF0000&
  35.       Caption         =   "Change &Height"
  36.       BeginProperty Font 
  37.          Name            =   "MS Sans Serif"
  38.          Size            =   8.25
  39.          Charset         =   0
  40.          Weight          =   700
  41.          Underline       =   0   'False
  42.          Italic          =   -1  'True
  43.          Strikethrough   =   0   'False
  44.       EndProperty
  45.       Height          =   495
  46.       Index           =   2
  47.       Left            =   2640
  48.       Style           =   1  'Graphical
  49.       TabIndex        =   2
  50.       Top             =   2520
  51.       Width           =   1215
  52.    End
  53.    Begin VB.CommandButton cmdChange 
  54.       BackColor       =   &H00FF0000&
  55.       Caption         =   "Change &Bold"
  56.       BeginProperty Font 
  57.          Name            =   "MS Sans Serif"
  58.          Size            =   8.25
  59.          Charset         =   0
  60.          Weight          =   700
  61.          Underline       =   0   'False
  62.          Italic          =   -1  'True
  63.          Strikethrough   =   0   'False
  64.       EndProperty
  65.       Height          =   495
  66.       Index           =   1
  67.       Left            =   2640
  68.       Style           =   1  'Graphical
  69.       TabIndex        =   1
  70.       Top             =   1560
  71.       Width           =   1215
  72.    End
  73.    Begin VB.CommandButton cmdChange 
  74.       BackColor       =   &H00FF0000&
  75.       Caption         =   "Change &Color"
  76.       BeginProperty Font 
  77.          Name            =   "MS Sans Serif"
  78.          Size            =   8.25
  79.          Charset         =   0
  80.          Weight          =   700
  81.          Underline       =   0   'False
  82.          Italic          =   -1  'True
  83.          Strikethrough   =   0   'False
  84.       EndProperty
  85.       Height          =   495
  86.       Index           =   0
  87.       Left            =   2640
  88.       Style           =   1  'Graphical
  89.       TabIndex        =   0
  90.       Top             =   600
  91.       Width           =   1215
  92.    End
  93. End
  94. Attribute VB_Name = "Form1"
  95. Attribute VB_GlobalNameSpace = False
  96. Attribute VB_Creatable = False
  97. Attribute VB_PredeclaredId = True
  98. Attribute VB_Exposed = False
  99. Private Sub cmdChange_Click(Index As Integer)
  100.   ' Changes ONLY the button clicked!So Remember That!
  101.   Select Case Index
  102.       Case 0:
  103.       If cmdChange.Item(Index).BackColor = vbRed Then
  104.          cmdChange.Item(Index).BackColor = vbBlue
  105.       Else
  106.          cmdChange.Item(Index).BackColor = vbRed
  107.       End If
  108.     Case 1:
  109.       If cmdChange.Item(Index).FontBold = True Then
  110.          cmdChange.Item(Index).FontBold = False
  111.       Else
  112.          cmdChange.Item(Index).FontBold = True
  113.       End If
  114.     Case 2:
  115.       If cmdChange.Item(Index).Height = 495 Then
  116.          cmdChange.Item(Index).Height = 595
  117.       Else
  118.          cmdChange.Item(Index).Height = 495
  119.       End If
  120.     Case 3:
  121.       If cmdChange.Item(Index).Width = 1215 Then
  122.          cmdChange.Item(Index).Width = 2000
  123.       Else
  124.          cmdChange.Item(Index).Width = 1215
  125.       End If
  126.     End Select
  127.    
  128. End Sub
  129.  
  130.